#查找路径下面所有源文件
aux_source_directory(. SRC_LIST)

#设置debug项目名后缀
set(CMAKE_DEBUG_POSTFIX "_gd")

#引用当前文件夹
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/)

#设置预处理
add_definitions(-DXTTO_EXPORTS)

#设置静态库
add_library(commonLibDataCheck STATIC ${SRC_LIST})

#设置预编译
SET_TARGET_PROPERTIES(commonLibDataCheck PROPERTIES COTIRE_CXX_PREFIX_HEADER_INIT "stdafx.h")
cotire(commonLibDataCheck)

#设置目录
set_target_properties(commonLibDataCheck PROPERTIES FOLDER "CommonLib")

#复制头文件到inchhvi
install(FILES md5.hpp DESTINATION ${PROJECT_SOURCE_DIR}/3rdlib/include/datacheck)

install(TARGETS commonLibDataCheck 
        RUNTIME DESTINATION ${PROJECT_BINARY_DIR}/bin
		ARCHIVE DESTINATION ${PROJECT_SOURCE_DIR}/3rdlib/lib)